<template>
  <div>
    <div class="top">
      <div @click="all(1)" :class="{ active: change == 1 }">全部</div>
      <div @click="men(2)" :class="{ active: change == 2 }">门诊</div>
      <div @click="zhu(3)" :class="{ active: change == 3 }">住院</div>
    </div>
    <router-view></router-view>
  </div>
</template>
<script>
export default {
  name: "",
  components: {},
  methods: {
    all(num) {
      this.$router.push("/home/report/report_home");
      this.change = num;
    },
    men(num) {
      this.$router.push("/home/report/report_outpatient");
      this.change = num;
    },
    zhu(num) {
      this.$router.push("/home/report/report_hospital");
      this.change = num;
    },
  },
  data() {
    return {
      change: 1,
    };
  },
};
</script>
<style lang="less" scoped>
.active {
  background-color: orangered;
  color: white !important;
  font-weight: bold;
  border-radius: 10px;
}
.top {
  background-color: white;
  div {
    float: left;
    width: 60px;
    height: 30px;
    color: skyblue;
    line-height: 30px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
  }
}
</style>